package site.wanjiahao.set;

public interface Set<E> {

    int size();

    boolean isEmpty();

    void clear();

    boolean contains(E ele);

    void add(E ele);

    void remove(E ele);

    void traversal(Consumer<E> consumer);

    abstract class Consumer<E> {
        boolean stop;

        public abstract boolean visit(E ele);
    }

}
